home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / icon tools / picticon / source / doloaddt.readme < prev    next >
Text File  |  1996-04-07  |  4KB  |  150 lines

  1.  
  2.    doloaddt.m  --  A datatype load, scale, remap and dither module.
  3.  
  4.                         COPYRIGHT ©1993,94 by:
  5.  
  6.               US.Snail: Chad Randall
  7.                         229 S.Washington St.
  8.                         Manchester, Michigan, 48157-9680  USA
  9.               Internet: crandall@garnet.msen.com
  10.  
  11.  
  12.     Permission is granted for usage is the following contions are met:
  13.  
  14.       1. Program displays "Datatype scaler written by Chad Randall" or equivelent,
  15.           but only if an "About" window is used.
  16.  
  17.       2. Program documentation contains author and copyright information.
  18.           At minimum, a duplication of information located at beginning of this source.
  19.  
  20.       3. If PD or Freeware, no fee is neccesary.
  21.  
  22.       4. If Shareware, then a registered version of said program must be mailed to me.
  23.  
  24.       5. Commercial usage must be authorized by me before distribution.
  25.  
  26.  
  27.  
  28.  
  29.  
  30. To  use  this  module from your E program, you must have E 3.0, as I'm
  31. not sure if it'll work on earlier versions.  You can try if you want.
  32.  
  33.  
  34. Just place the following line near the top of your main E source file:
  35.  
  36. MODULE '*doloaddt'  -> If the module is in the same directory, or
  37.  
  38. MODULE 'tools/doloaddt'  -> if it's located in EMODULES:tools
  39.  
  40.  
  41. The format of the call is:
  42.  
  43. doloaddt(source,rastport,colormap,xtop,ytop,width,height,tags)
  44.  
  45. source: Either a pointer to a string or a clipboard unit number.
  46.     (If  source  <257  then  it's  treated  as  a unit number, strings
  47.      shouldn't reside below here, anyways!)
  48.  
  49. rastport: A pointer to a valid rastport.  No checks are made.
  50.  
  51. colormap: A pointer to a valid colormap.  No checks are made.
  52.  
  53. xtop: The leftmost/topmost point that can be affected.
  54. ytop:
  55.  
  56. width:  The size of the buffer you wish to fill.
  57. height:
  58.  
  59. tags:  A pointer to a list of tagitems;
  60.  
  61.     name    /type    /default
  62.  
  63.   DLDT_CENTER /boolean/FALSE
  64.         If =TRUE then the image is centered in the buffer.
  65.  
  66.   DLDT_INTEGERSCALE /boolean/FALSE
  67.         If =TRUE then integerscaling will be performed.  NOT TESTED (much)
  68.  
  69.     DLDT_DITHER /boolean/TRUE
  70.         If =TRUE then then dithering is performed.
  71.  
  72.     DLDT_REMAP /boolean/TRUE
  73.         If =TRUE then FindColor(colormap) is used to remap colors.
  74.  
  75.   DLDT_ASPECTX /integer/1
  76.   DLDT_ASPECTY /integer/1
  77.         Defines the screen aspect of X:Y
  78.  
  79.     DLDT_SCALE /boolean/TRUE
  80.         If =TRUE then image is scaled to fit buffer, else it's clipped
  81.  
  82.     DLDT_USEASPECT /boolean/TRUE
  83.         If  =TRUE  then  aspect  information is used in scaling, otherwise
  84.     it's ignored.
  85.  
  86.     DLDT_ENLARGE /boolean/FALSE
  87.     NOT IMPLEMENTED
  88.  
  89.     DLDT_CLEAR /boolean/TRUE
  90.         IF =TRUE, then buffer is cleared
  91.  
  92.   DLDT_GAUGE /PTR TO gauge/0
  93.         IF present, then a gauge struct is used to display progress.
  94.     "gauge" is defined below
  95.  
  96.     DLDT_CLIGAUGE /string/0
  97.         If  present,  a  string  is  filled  with  a  number from 1-100 to
  98.     indicate  the  percentage  done.   String  should  contain  a "%s"
  99.     symbol.
  100.  
  101.   DLDT_HOOK /0/0
  102.         NOT IMPLEMENTED/DONT USE
  103.  
  104.   DLDT_INFO /PTR TO imageinfo/0
  105.         If present, an imageinfo struct will be filled with picture/buffer
  106.     information.  Defined below.
  107.  
  108.   DLDT_BIDIRECTIONAL
  109.     NOT IMPLEMENTED
  110.  
  111.   DLDT_DIARRAY
  112.     NOT IMPLEMENTED
  113.  
  114.   DLDT_HIGHPEN /integer/-1
  115.         Highest pen to use for FindColor().  A -1 indicates all pens.
  116.  
  117.  
  118. OBJECT gauge
  119.   rast:PTR TO rastport -> rastport to draw progress bar in
  120.   scr:PTR TO screen    -> needed for drawinfo
  121.   x:INT                -> dimensions of bar box. NO "bevel" box is drawn.
  122.   y:INT                ->  that's up to YOU.
  123.   w:INT
  124.   h:INT
  125. ENDOBJECT
  126.  
  127.  
  128. OBJECT imageinfo
  129.   source_w:LONG      -> source picture dimensions
  130.   source_h:LONG
  131.   destination_x:LONG -> what was affected inside the rastport
  132.   destination_y:LONG
  133.   destination_w:LONG
  134.   destination_h:LONG
  135.   depth:LONG         -> the depth of the source picture
  136.   highest_pen:LONG   ->
  137.   reserved1:LONG
  138.   reserved2:LONG
  139.   reserved3:LONG
  140.   reserved4:LONG
  141.   reserved5:LONG
  142.   reserved6:LONG
  143.   reserved7:LONG
  144.   reserved8:LONG
  145.   blackpen:LONG      -> A pen closest to black
  146.   whitepen:LONG      -> A pen closest to white
  147.   greypen:LONG       -> A pen closest to grey
  148. ENDOBJECT
  149.  
  150.